window.onload = function () {
    initSelect();
}

function initSelect() {
     var sltCity = document.getElementById('sltCity');
     cities.unshift({
         id:0,
         name:'--所有城市---'
     })
     for (var i=0;i<cities.length;i++){
         var opt = document.createElement('option');
         opt.value = cities[i].id;
         opt.text = cities[i].name;
         sltCity.appendChild(opt);
     }

}